<?php

namespace App\Http\Controllers\Admin;

use App\Models\Orderrecord;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;

class OrderrecordController extends Controller
{

    public function __construct()
    {
        view()->share([
            '_orders' => 'am-in',
            '_order' => 'am-active',

        ]);

    }



        //订单详情页

    public function index($id){
        //订单详情关联订单，会员
        $orderrecords=Orderrecord::where('order_id',$id)->with('order.oncustomer')->get();

        return view('admin.order.orderrecord',compact('orderrecords'));

    }
}
